Dark Age Version 0.4.1006 Released!

Started by
51 comments, last by Black Knight 14 years, 4 months ago
I'm getting the same errors as lilljohan, except that my Documents folder is the default one. Yes, I have a Dark Age folder in My Documents and it also contains userprefs.ini.

The log file says the following:
File = .\src\DirectX\D3D9Renderer.cppFunction = STE::D3D9Renderer::getTextLine = 555Message = Arial 15 returning null font.File = .\src\DirectX\D3D9Renderer.cppFunction = STE::D3D9Renderer::getTextLine = 555Message = Gaeilge 1 20 returning null font.File = .\src\DirectX\D3D9Renderer.cppFunction = STE::D3D9Renderer::getTextLine = 555Message = Arial 12 returning null font.File = .\src\DirectX\D3D9Renderer.cppFunction = STE::D3D9Renderer::getTextLine = 555Message = Gaeilge3d returning null font.File = .\src\DirectX\D3D9Renderer.cppFunction = STE::D3D9Renderer::getEffectLine = 296Message = Can't find effect terrain.fx


[Edited by - Haptic on November 27, 2009 5:25:49 PM]
- Haptic
Advertisement
Hmm if there is nothing else after that lines in the log file it is failing in loading terrain.fx.Strange your graphics cards should handle those shaders.Do you have the latest dx9 runtimes and stuff.

Oh wait so your saying it gives the error cannot find userPrefs.ini at the beginning??

I found out something in my code which might be the cause.I was getting the my documents folder like this :

SHGetFolderPath(NULL,CSIDL_MYDOCUMENTS,NULL,SHGFP_TYPE_DEFAULT,path);

This only gets the path if it exists in its default location,if it is moved or renamed or redirected etc it fails.

SHGetFolderPath(NULL,CSIDL_MYDOCUMENTS,NULL,SHGFP_TYPE_CURRENT,path); should get the folder in its current location.

More info here

I will make a new executable and upload it for testing if this is the problem.

[Edited by - Black Knight on November 27, 2009 9:52:40 PM]
I have uploaded the latest revision to my site as a test build.Here is the link :

download

I have changed the code to get the user folder to this :

char path[1024] = {0};	if(SUCCEEDED(SHGetFolderPath(NULL,CSIDL_MYDOCUMENTS,NULL,SHGFP_TYPE_CURRENT ,path)) == false)	{		if(SUCCEEDED(SHGetFolderPath(NULL,CSIDL_MYDOCUMENTS|CSIDL_FLAG_CREATE,NULL,SHGFP_TYPE_DEFAULT ,path)) == false)		{			throw STE::RunTimeException("Couldn't get/create Documents folder",FUNCTIONINFO);		}	}		m_DarkAgePath = path;	m_DarkAgePath+="\\Dark Age";	m_SavesPath = path;	m_SavesPath += "\\Dark Age\\Saves";		if(!STE::STUtil::DirectoryExist(m_DarkAgePath))	{		CreateDirectory(m_DarkAgePath.c_str(),NULL);		CreateDirectory(m_SavesPath.c_str(),NULL);	}		//copy user prefs to darkage folder if it doesnt exist	std::string filePath = m_DarkAgePath + "\\userPrefs.ini";	if( !STE::STUtil::FileExist(filePath))	{			SetCurrentDirectory(m_GamePath.c_str());		std::ifstream ifile("userPrefs.ini");		SetCurrentDirectory(m_DarkAgePath.c_str());		std::ofstream ofile("userPrefs.ini");		ofile << ifile.rdbuf();	}


It first tries to get the current location if it can't it tries to create it at the default location.And if that fails too should throw an exception.

The test build is not stable it has unfinished code for the new entity system and lots of stuff so don't blame me if it crashes during game play [smile]

Let me know how it turns out.
Ah no, sorry, my internet has been really horrible lately and I just skimmed the previous posts before it cut out again!

I don't get errors about userPrefs.ini, but I get the same errors about fonts and terrain.fx. What I posted is the whole log file after is says 'Dark Age Started!'

My graphics card has never had an issue with any commercial games or any of the crazy shaders I've concocted so I don't think thats the issue.

I would love to test the new build but my internets pulling about 4kB/s at the moment and cuts out completely every 10/15 minutes. It's going to be mid next week at least before the phone guy comes and fixes stuff (longer judging by the last time they 'helped').
- Haptic
OK let me know when you have chance to test it.
I have also found a bug in my effect loading code which would cause crashes if the graphics card doesn't support DX 9.0c,I had pixel shader that are using ps_2_b and if the card didn't support it,it was crashing.I fixed those bugs and upgraded the game to use shader model 3.0 which is DX 9.0c anyway.

Try this link for the new setup : download
Edit: I reinstalled DirectX and the game now runs fine. DxDiag said I already had DirectX11 installed so I'm not sure what the issue was but all works fine now.


Ok, my internet has fixed itself!

Still having issues. The log file just says when Dark age was started and ended.

The error message when I run the game is:

     Error message :     Can't add effect file terrain.fx (Couldnt get compilation errors)     File:.\src\DirectX\D3D9Renderer.cpp     Function: STE::D3D9Renderer::addEffect     Line: 288     ---------------------------------------------------     STEngine
- Haptic
I have the same issue as haptic. does not run due to that error.
What is your graphics card?You need a DX9.0c capable card which has shader model 3.0 support.

Hey I tried to play the game but it crashes on start. says something about not loading terain.fx is there a fix for this? I'm using vista.
Do you have a graphics card that supports DX9.0c(shader model 3.0)?

This topic is closed to new replies.

Advertisement